* This determines the server OS and returns a valid regex to parse
* ls() output.
*
* @access private
* @param array $dir_list The raw dir list to parse
* @return mixed An array of 'pattern' and 'map' on success, otherwise PEAR::Error
* @see NET_FTP_ERR_DIRLIST_UNSUPPORTED
*/
function _determine_os_match(&$dir_list) {
foreach ($dir_list as $entry) {
foreach ($this->_ls_match as $os => $match) {
if (preg_match($match['pattern'], $entry)) {
return $match;
}
}
}
$error = 'The list style of your server seems not to be supported. Please email a "$ftp->ls(NET_FTP_RAWLIST);" output plus info on the server to the maintainer of this package to get it supported! Thanks for your help!';